import 'package:flutter_screenutil/screenutil.dart';
import 'package:flutter/material.dart';

class SelectRepayItem extends StatefulWidget {
  Map infoMap;
  SelectRepayItem({this.infoMap,Key key}):super(key: key);
  @override
  _SelectRepayItemState createState() => _SelectRepayItemState();
}

class _SelectRepayItemState extends State<SelectRepayItem> {
  @override
  Widget build(BuildContext context) {

    return Container(
      height: ScreenUtil().setWidth(111),
      width: ScreenUtil().setWidth(345),
      decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(8),
          color: Colors.white
      ),
      child:Row(
        children: [
          SizedBox(width: ScreenUtil().setWidth(11),),
          Column(
            children: [
              SizedBox(height: ScreenUtil().setWidth(36),),
              Container(
                width: ScreenUtil().setWidth(100),
                child:Text(widget.infoMap != null ? widget.infoMap['topleft']:"￥200,000.00",style: TextStyle(fontSize: ScreenUtil().setSp(16),color:Color(0xffFF1C1C)),textAlign: TextAlign.center,),
              ),
              SizedBox(height: ScreenUtil().setWidth(5),),
              Container(
                width: ScreenUtil().setWidth(100),
                child:Text(widget.infoMap != null? widget.infoMap['bottomleft']:"合同额度",style: TextStyle(fontSize: ScreenUtil().setSp(12),),textAlign: TextAlign.center,),
              ),
            ],
          ),
          SizedBox(width: ScreenUtil().setWidth(8),),
          Container(
            color: Color(0xffE8E8E8) ,
            width: ScreenUtil().setWidth(1),
            height: ScreenUtil().setWidth(73),
          ),
          SizedBox(
            width: ScreenUtil().setWidth(14),
          ),
          Column(
            children: [
              SizedBox(height: ScreenUtil().setWidth(19),),
              Container(
                width: ScreenUtil().setWidth(190),
                child:Text(widget.infoMap !=null? widget.infoMap['topRight']:"贷款账号：3401 **** **** *391 9",style: TextStyle(fontSize: ScreenUtil().setSp(12)),textAlign: TextAlign.left,),
              ),
              SizedBox(height: ScreenUtil().setWidth(11),),
              Container(
                width: ScreenUtil().setWidth(190),
                child:Text(widget.infoMap !=null? widget.infoMap['centerRight']:"借款日期：2021-05-01",style: TextStyle(fontSize: ScreenUtil().setSp(12),),textAlign: TextAlign.left,),
              ),
              SizedBox(height: ScreenUtil().setWidth(11),),
              Container(
                width: ScreenUtil().setWidth(190),
                child:Text(widget.infoMap !=null? widget.infoMap['bottomRight']:"到期日期：2022-04-30",style: TextStyle(fontSize: ScreenUtil().setSp(12),),textAlign: TextAlign.left,),
              ),
            ],
          ),
          Container(
            width: ScreenUtil().setWidth(8),
            height: ScreenUtil().setWidth(14),
            child: Image.asset("sources/yy/rightArrown.png"),
          )
        ],
      ) ,
    );
  }
}
